Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
zulhfreelancer / show-all-docker-build-logs.md
Created June 1, 2023 08:25
How to show all `docker build` logs?

How to show all docker build logs?

docker build -t YOUR-USER-NAME/YOUR-REPO:<YOUR-IMAGE-TAG> --no-cache --progress=plain .
@dhondta
dhondta / README.md
Last active May 10, 2024 16:28
Tinyscript steganography tool implementing the Least Significant Bit algorithm

StegoLSB

This Tinyscript-based tool allows to apply steganography based on LSB (Least Significant Bit) in order to retrieve hidden data from an image.

$ pip install tinyscript
$ tsm install stegolsb

@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active May 10, 2024 16:28
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@ddelange
ddelange / stream_command.py
Last active May 10, 2024 16:28
Handling the live output stream of a command
import logging
from collections import deque
from concurrent.futures import ThreadPoolExecutor
from functools import partial
from subprocess import PIPE, CalledProcessError, CompletedProcess, Popen
def stream_command(
args,
*,
@nmbrgts
nmbrgts / karabiner.json
Created March 24, 2023 18:55
This is my Karabiner config, which provides a rough home-row-mod-like experience. The rules that follow the "<key>/<mod>" naming convention might help others write similar or better rules. "to_if_alone" doesn't perfectly replicate mod-tap behavior though. If you hold down a key and release it, the key will still register as it's "to_if_alone" va…
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@rtimmons
rtimmons / slides.md
Created June 21, 2018 18:11
Learning C++ The Hard Way

Welcome

Who is this guy?

Goal(s)

  1. Don't WTF quite so much when looking at C++ PRs
  2. Know what you don't know (so you know what to look up to learn more)

Agenda

@agriffis
agriffis / .vimrc
Created February 25, 2019 12:53
neovim clipboard provider for tmux and OSC 52
function! ClipboardCopy(lines, regtype)
let sum = TryClipboardCmd('md5sum', a:lines)
call writefile(sum, s:regtype_sum, 'S')
call writefile([a:regtype], s:regtype_txt, 'S')
return TryClipboardCmd('clipboard-provider copy', a:lines)
endfunction
function! ClipboardPaste()
let lines = TryClipboardCmd('clipboard-provider paste')
let regtype = 'V'
@mildsunrise
mildsunrise / README.md
Last active May 10, 2024 16:20
Documentation of Tuya's weird compression scheme for IR codes

[Tuya][]'s IR blasters, like the [ZS08][], have the ability to both learn and blast generic IR codes. These IR codes are given to the user as an opaque string, like this:

A/IEiwFAAwbJAfIE8gSLIAUBiwFAC+ADAwuLAfIE8gSLAckBRx9AB0ADBskB8gTyBIsgBQGLAUALA4sB8gRAB8ADBfIEiwHJAeARLwHJAeAFAwHyBOC5LwGLAeA97wOLAfIE4RcfBYsB8gTyBEAFAYsB4AcrCYsB8gTyBIsByQHgPY8DyQHyBOAHAwHyBEAX4BVfBIsB8gTJoAMF8gSLAckB4BUvAckB4AEDBfIEiwHJAQ==

Not much is known about the format of these IR code strings, which makes it difficult to use codes obtained through other means (such as a